Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Handle generic check destroy in acceptance tests #2716

Merged
merged 28 commits into from
Apr 17, 2024

Conversation

sfc-gh-asawicki
Copy link
Collaborator

@sfc-gh-asawicki sfc-gh-asawicki commented Apr 16, 2024

  • Added check destroy to almost all objects (check below).
  • Changed signatures of ShowByID methods requiring request and not just a plain id
  • Removed checks from datasources (just a handful) - current approach is to check the resource under test removal from SF and datasource is not created on the SF side
  • Corrected the bad checks that were the results of copy-paste
  • Moved existing complex checks with annotation to rework them later

Follow-up needed:

  • all the existing CheckDestroy's were addressed but there still may be some tests without CheckDestroy specified; ideally, we should have an automatic way (e.g. as part of architest, to validate this); it will be added to one of the future improvements

Did not work on:

  • old *_grant resources and grant_privileges_to_role - deprecated resources
  • *_parameter resources - no showbyid nor existing custom check
  • snowflake_account_password_policy_attachment - no showbyid nor existing custom check
  • snowflake_external_oauth_integration, snowflake_oauth_integration, snowflake_saml_integration, snowflake_scim_integration - no SDK
  • snowflake_network_policy_attachment - no showbyid nor existing custom check
  • snowflake_table_column_masking_policy_application - no showbyid nor existing custom check
  • snowflake_table_constraint - no showbyid nor existing custom check
  • snowflake_tag_association - no showbyid nor existing custom check
  • snowflake_tag_masking_policy_association no showbyid nor existing custom check
  • snowflake_unsafe_execute - a bit different use case (will be handled with the helpers cleanup)
  • snowflake_user_public_keys - no showbyid nor existing custom check

The ones that does not have showbyid or existing check will be handled as part of upcoming resource redesign.

Supported objects:

  • snowflake_account
  • snowflake_alert
  • snowflake_api_integration
  • snowflake_database
  • snowflake_database_role
  • snowflake_dynamic_table
  • snowflake_email_notification_integration
  • snowflake_external_function
  • snowflake_external_table
  • snowflake_failover_group
  • snowflake_file_format
  • snowflake_function
  • snowflake_managed_account
  • snowflake_masking_policy
  • snowflake_materialized_view
  • snowflake_network_policy
  • snowflake_notification_integration
  • snowflake_password_policy
  • snowflake_pipe
  • snowflake_procedure
  • snowflake_resource_monitor
  • snowflake_role
  • snowflake_row_access_policy
  • snowflake_schema
  • snowflake_sequence
  • snowflake_share
  • snowflake_stage
  • snowflake_storage_integration
  • snowflake_stream
  • snowflake_table
  • snowflake_tag
  • snowflake_task
  • snowflake_user
  • snowflake_view
  • snowflake_warehouse

Copy link

Integration tests failure for 5ccf8fd9473ce4c02fea147f7cbab9495ddc10b2

1 similar comment
Copy link

Integration tests failure for 5ccf8fd9473ce4c02fea147f7cbab9495ddc10b2

Copy link

Integration tests success for 5ccf8fd9473ce4c02fea147f7cbab9495ddc10b2

@sfc-gh-asawicki sfc-gh-asawicki marked this pull request as ready for review April 16, 2024 13:59
Copy link

Integration tests failure for ac2f33cda788f2907d08bf3f2729a03e47475e0f

Copy link

Integration tests failure for 6d6c35530583dafbaf9df0c32b06530412e11a8d

@sfc-gh-asawicki sfc-gh-asawicki merged commit 63a5324 into main Apr 17, 2024
8 of 9 checks passed
@sfc-gh-asawicki sfc-gh-asawicki deleted the handle-generic-check-destroy-in-acceptance-tests branch April 17, 2024 16:27
sfc-gh-jcieslak pushed a commit that referenced this pull request Apr 18, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.89.0](v0.88.0...v0.89.0)
(2024-04-18)


### 🎉 **What's new:**

* Update target objects for privilege-granting resources
([#2688](#2688))
([74e2b6b](74e2b6b))


### 🔧 **Misc**

* Handle generic check destroy in acceptance tests
([#2716](#2716))
([63a5324](63a5324))
* Initialize the SDK client in fewer places
([#2710](#2710))
([382bfc1](382bfc1))


### 🐛 **Bug fixes:**

* Adds case statement for ObjectTypeUser in ShowObjectParameter.
([#2675](#2675))
([23a3341](23a3341))
* diffs always occurring when multiple columns exist
([#2686](#2686))
([3275ad4](3275ad4))
* Fix issues
[#2679](#2679)
[#2721](#2721)
([#2723](#2723))
([b0c9dd4](b0c9dd4))
* Fix several small issues
([#2697](#2697))
([e3f6a15](e3f6a15))
* granting ownership on database roles
([#2703](#2703))
([88944e7](88944e7))
* network policy update
([#2647](#2647))
([8126b28](8126b28))
* Rename grants_redesign_desgin_decisions.md to grants_redesign_design_…
([#2691](#2691))
([5000b2b](5000b2b))
* renames in update operations
([#2702](#2702))
([793c879](793c879))
* showbyid method tests
([#2648](#2648))
([ff5e617](ff5e617))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: snowflake-release-please[bot] <105954990+snowflake-release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants